<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>emp-toolkit: Hash Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo-full-doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">emp-toolkit
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_hash.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="class_hash-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Hash Class Reference<div class="ingroups"><a class="el" href="group___b_p.html">Basic Primitives</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="hash_8h_source.html">hash.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af482880ad75b67a09d2dcb5e86244d80"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash.html#af482880ad75b67a09d2dcb5e86244d80">Hash</a> ()</td></tr>
<tr class="separator:af482880ad75b67a09d2dcb5e86244d80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e4b4797dda8678aaed058bae155813e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash.html#a4e4b4797dda8678aaed058bae155813e">~Hash</a> ()</td></tr>
<tr class="separator:a4e4b4797dda8678aaed058bae155813e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bb9da7bf411c5db9af391fc3ec74f81"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash.html#a4bb9da7bf411c5db9af391fc3ec74f81">put</a> (const void *data, int nbyte)</td></tr>
<tr class="separator:a4bb9da7bf411c5db9af391fc3ec74f81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86ad3dcd18b0b279d4039e4404a1043c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash.html#a86ad3dcd18b0b279d4039e4404a1043c">put_block</a> (const <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *<a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>, int nblock=1)</td></tr>
<tr class="separator:a86ad3dcd18b0b279d4039e4404a1043c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a574b6b0ef1b80eb4b15809cc15257a3f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash.html#a574b6b0ef1b80eb4b15809cc15257a3f">digest</a> (char *a)</td></tr>
<tr class="separator:a574b6b0ef1b80eb4b15809cc15257a3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c8d5864406c53c5ea83aa7bfb94c47d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash.html#a9c8d5864406c53c5ea83aa7bfb94c47d">reset</a> ()</td></tr>
<tr class="separator:a9c8d5864406c53c5ea83aa7bfb94c47d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa71d7a2c968e2594ef5c28d819617e30"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash.html#aa71d7a2c968e2594ef5c28d819617e30">put_eb</a> (const eb_t *eb, int length)</td></tr>
<tr class="separator:aa71d7a2c968e2594ef5c28d819617e30"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a315c7f00ae3d92173fa452006b98501f"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash.html#a315c7f00ae3d92173fa452006b98501f">hash_once</a> (void *<a class="el" href="class_hash.html#a574b6b0ef1b80eb4b15809cc15257a3f">digest</a>, const void *data, int nbyte)</td></tr>
<tr class="separator:a315c7f00ae3d92173fa452006b98501f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b3eafe3161e79b29a1501890bc3bbc0"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash.html#a0b3eafe3161e79b29a1501890bc3bbc0">hash_for_block</a> (const void *data, int nbyte)</td></tr>
<tr class="separator:a0b3eafe3161e79b29a1501890bc3bbc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:afd43dfd1a98f58dd6ea17eb3bba8a6c2"><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash.html#afd43dfd1a98f58dd6ea17eb3bba8a6c2">DIGEST_SIZE</a> = 20</td></tr>
<tr class="separator:afd43dfd1a98f58dd6ea17eb3bba8a6c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="af482880ad75b67a09d2dcb5e86244d80"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af482880ad75b67a09d2dcb5e86244d80">&sect;&nbsp;</a></span>Hash()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Hash::Hash </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a4e4b4797dda8678aaed058bae155813e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e4b4797dda8678aaed058bae155813e">&sect;&nbsp;</a></span>~Hash()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Hash::~Hash </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a574b6b0ef1b80eb4b15809cc15257a3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a574b6b0ef1b80eb4b15809cc15257a3f">&sect;&nbsp;</a></span>digest()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Hash::digest </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a0b3eafe3161e79b29a1501890bc3bbc0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b3eafe3161e79b29a1501890bc3bbc0">&sect;&nbsp;</a></span>hash_for_block()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> Hash::hash_for_block </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nbyte</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a315c7f00ae3d92173fa452006b98501f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a315c7f00ae3d92173fa452006b98501f">&sect;&nbsp;</a></span>hash_once()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Hash::hash_once </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>digest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nbyte</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a4bb9da7bf411c5db9af391fc3ec74f81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bb9da7bf411c5db9af391fc3ec74f81">&sect;&nbsp;</a></span>put()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Hash::put </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nbyte</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a86ad3dcd18b0b279d4039e4404a1043c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86ad3dcd18b0b279d4039e4404a1043c">&sect;&nbsp;</a></span>put_block()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Hash::put_block </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *&#160;</td>
          <td class="paramname"><em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nblock</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="aa71d7a2c968e2594ef5c28d819617e30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa71d7a2c968e2594ef5c28d819617e30">&sect;&nbsp;</a></span>put_eb()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Hash::put_eb </td>
          <td>(</td>
          <td class="paramtype">const eb_t *&#160;</td>
          <td class="paramname"><em>eb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a9c8d5864406c53c5ea83aa7bfb94c47d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c8d5864406c53c5ea83aa7bfb94c47d">&sect;&nbsp;</a></span>reset()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Hash::reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="afd43dfd1a98f58dd6ea17eb3bba8a6c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd43dfd1a98f58dd6ea17eb3bba8a6c2">&sect;&nbsp;</a></span>DIGEST_SIZE</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const int Hash::DIGEST_SIZE = 20</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/Users/wangxiao/git/emp-toolkit/emp-tool/utils/<a class="el" href="hash_8h_source.html">hash.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_hash.html">Hash</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
